package tests;

import java.util.List;

import metier.Film;
import DAO.DAOFilm;
import DAO.DAOFilmJPA;

public class test {

	public static void main(String[] args) {
		DAOFilm dao=DAOFilmJPA.getInstance();
		Film film = new Film("titreFilm",2014,20);
		Film film2 = new Film("testfilm",2014,20);
		Film film3 = new Film("titretest",2014,20);
		dao.save(film);
		dao.save(film2);
		dao.save(film3);
		List<Film>liste=dao.loadAllWithName("test");
		
		for(int i=0;i<liste.size();++i)
			System.out.println(liste.get(i));
	}

}
